import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import { LocalStorageService } from '../../local-storage.service';

@Component({selector: 'goods-item0', templateUrl: './goods-item0.component.html', styleUrls: ['./goods-item0.component.css'], inputs: ["item"]})
export class GoodsItem0Component implements OnInit {
  item : any = {}
  private lStorage : LocalStorageService=new LocalStorageService();
  constructor(private route : Router) {}
  goView(ev) {
    ev.stopPropagation();
    this.lStorage.setObject("info_"+this.item.num_iid,this.item);
    this
      .route
      .navigateByUrl("/view/" + this.item.num_iid);
  }
  clearClick(ev){
    ev.stopPropagation();
  }
  ngOnInit() {}

}
